<?php
/*
 * 车主圈的数据库操作类
 * @package    Db
 * @author     wl
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: ac396591d66340ab5d46098b2b10936075eb10cf $
 */
defined('IN_IXDCW') or exit('Access Denied');
final class OwnersDb extends CoreDb{


	public function __construct(){
		parent::__construct();
	}


	public function getFields(){
		return $this->fields('true');
	}


	/**
	 * 获取一条车主圈数据
	 * @param string $username
	 * @return array
	 */

	public function getByUsername($username) {
		$sql = "
			SELECT *
			FROM {$this->tableName()}
			WHERE username='".$username."'";
		return $this->_db->getOne($sql);
	}

}